package de.tum.in.eist.im.client;

import java.util.Date;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import de.tum.in.eist.im.client.domain.AbstractEvent;
import de.tum.in.eist.im.client.domain.Message;
import de.tum.in.eist.im.client.domain.NewMessagesChunk;
import de.tum.in.eist.im.client.domain.User;

public interface ChatServiceAsync {

	void getEventsBlocking(User user,
			AsyncCallback<List<AbstractEvent>> callback);

	void getLoggedInUsers(AsyncCallback<List<User>> callback);

	void getNewMessages(long clientLastTimestamp,
			AsyncCallback<NewMessagesChunk> callback);

	void login(User user, AsyncCallback<Boolean> callback);

	void logout(User user, AsyncCallback<Boolean> callback);

	void registerNewUser(User newUser, AsyncCallback<Void> callback);

	void sendMessage(Message message, AsyncCallback<Void> callback);

}